.popup-record-container {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden; // Disable horizontal scrollbar
  padding: 16px 0;
  box-sizing: border-box;
  width: 100%;
  
  // Smooth scrolling optimization
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; // iOS Safari scrolling optimization
  overscroll-behavior: contain; // Prevent scroll propagation
  
  // Unified scrollbar style
  &::-webkit-scrollbar {
    width: 6px;
  }
  
  &::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }
  
  &::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    
    &:hover {
      background: #a1a1a1;
    }
  }
  
  // Prevent all child elements from exceeding container width
  * {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  // View-specific styles
  .record-list-view {
    width: 100%;
    max-width: 100%;
    height: 100%;
    
    .session-list {
      width: 100%;
      max-width: 100%;
      
      .ant-list-item {
        padding: 8px 0;
        width: 100%;
        max-width: 100%;
        
        .ant-card {
          transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
          width: 100%;
          max-width: 100%;
          will-change: transform, box-shadow;
          
          &:hover {
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
            transform: translateY(-2px) scale(1.01);
          }
          
          &.selected-session {
            box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15);
            
            .ant-card-head {
              background-color: #f0f7ff;
            }
          }
          
          .ant-card-actions {
            background-color: #fafafa;
            
            .ant-btn {
              border: none;
              box-shadow: none;
              
              &:hover {
                background-color: #e6f7ff;
              }
              
              &.ant-btn-dangerous:hover {
                background-color: #fff2f0;
              }
            }
          }
          
          .session-meta {
            width: 100%;
            max-width: 100%;
            
            .session-status {
              display: flex;
              align-items: center;
              gap: 8px;
              margin-bottom: 4px;
            }
            
            .session-details {
              font-size: 12px;
              color: #999;
              line-height: 1.4;
              word-break: break-all;
              white-space: normal;
            }
          }
        }
      }
    }
    
    .session-empty {
      text-align: center;
      padding: 40px 20px;
      width: 100%;
      max-width: 100%;
      
      .ant-empty-description {
        color: #999;
      }
    }
  }
  
  .record-detail-view {
    width: 100%;
    max-width: 100%;
    scroll-behavior: smooth;
    
    // Header section
    .detail-header {
      width: 100%;
      max-width: 100%;
      margin-bottom: 12px;
      
      .back-button {
        flex-shrink: 0;
      }
    }

    // Session title section
    .session-title-section {
      width: 100%;
      max-width: 100%;
      margin-bottom: 16px;
      text-align: center;
      
      .session-title-text {
        margin: 0 !important;
        margin-bottom: 4px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        cursor: default;
        
        &:hover {
          color: #1890ff;
        }
      }
    }
    
    // Recording status section
    .recording-status {
      width: 100%;
      max-width: 100%;
      margin-bottom: 16px;
      word-wrap: break-word;
    }
    
    // Session info card
    .session-info-card {
      width: 100%;
      max-width: 100%;
      margin-bottom: 16px;
      
      .ant-card-body {
        padding: 16px;
      }
    }
    
    // Controls section
    .controls-section {
      width: 100%;
      max-width: 100%;
      margin-bottom: 16px;
      
      .current-tab-info {
        width: 100%;
        max-width: 100%;
        margin-bottom: 12px;
        word-break: break-all;
        white-space: normal;
      }
      
      .record-controls {
        width: 100%;
        max-width: 100%;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        
        .ant-btn {
          flex-shrink: 0;
          max-width: 100%;
        }
      }
    }
    
    // Events section
    .events-section {
      width: 100%;
      max-width: 100%;
      
      .events-header {
        width: 100%;
        max-width: 100%;
        margin-bottom: 12px;
        
        h5 {
          margin: 0;
          font-weight: 600;
        }
      }
      
      .events-container {
        width: 100%;
        max-width: 100%;
        
        &.empty {
          display: flex;
          align-items: center;
          justify-content: center;
          color: #999;
          font-style: italic;
          min-height: 100px;
        }
      }
    }
    
    .session-info {
      .ant-space {
        width: 100%;
        max-width: 100%;
        
        > div {
          display: flex;
          align-items: flex-start;
          width: 100%;
          max-width: 100%;
          
          .ant-typography {
            margin: 0;
            word-break: break-all;
            white-space: normal;
            max-width: 100%;
          }
        }
      }
    }
  }
  
  .record-timeline {
    // remove internal scrollbar and fixed height, let content expand naturally
    width: 100%;
    max-width: 100%;
    padding: 16px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    background-color: #fafafa;
    overflow: visible;
    box-sizing: border-box;
    
    // smooth animation optimization
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform; // optimize GPU acceleration
    
    // ensure internal components do not generate scrollbars and fully utilize width
    .ant-timeline {
      width: 100%;
      max-width: 100%;
      overflow: visible;
      
      .ant-timeline-item {
        width: 100%;
        max-width: 100%;
        
        // smooth entry animation
        animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        
        &:last-child {
          animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .ant-timeline-item-content {
          width: 100%;
          max-width: 100%;
          box-sizing: border-box;
        }
      }
    }
    
    .ant-card {
      width: 100%;
      max-width: 100%;
      overflow: visible;
      box-sizing: border-box;
      
      .ant-card-body {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 12px 16px;
        word-wrap: break-word;
      }
    }
    
    .ant-space {
      width: 100%;
      max-width: 100%;
      
      .ant-space-item {
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
      }
    }
  }
  
  .record-event {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 100%;
    will-change: transform, box-shadow;
    
    &:hover {
      transform: translateX(4px) scale(1.01);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }
  }
  
  .record-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    max-width: 100%;
    
    .ant-btn {
      flex-shrink: 0;
      max-width: 100%;
    }
  }
  
  .current-tab-info {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #1890ff;
    word-break: break-all;
    white-space: normal;
  }

  // Recording status indicator
  .recording-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    
    &.recording {
      background-color: #fff2f0;
      border: 1px solid #ffccc7;
      color: #cf1322;
      
      &::before {
        content: '';
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: #ff4d4f;
        animation: recording-pulse 1.5s infinite;
      }
    }
    
    &.idle {
      background-color: #f6ffed;
      border: 1px solid #d9f7be;
      color: #389e0d;
    }
  }

  @keyframes recording-pulse {
    0% {
      opacity: 1;
      transform: scale(1);
    }
    50% {
      opacity: 0.5;
      transform: scale(1.2);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }

  // smooth slide-in animation
  @keyframes slideInUp {
    0% {
      opacity: 0;
      transform: translateY(20px) scale(0.95);
    }
    100% {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  // smoother fade-in animation
  @keyframes fadeInScale {
    0% {
      opacity: 0;
      transform: scale(0.9);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }

  // Modal styles
  .session-modal {
    .ant-modal-body {
      padding: 24px;
    }
    
    .ant-form-item-label {
      font-weight: 500;
    }
    
    .ant-btn-group {
      display: flex;
      gap: 8px;
    }
  }

  // Section dividers
  .section-divider {
    margin: 24px 0;
    border-color: #e8e8e8;
  }
  
  // disable scrollbar in all Ant Design components
  .ant-list {
    overflow: visible !important;
    max-width: 100% !important;
  }
  
  .ant-list-item {
    overflow: visible !important;
    max-width: 100% !important;
  }
  
  .ant-card {
    overflow: visible !important;
    max-width: 100% !important;
  }
  
  .ant-card-body {
    overflow: visible !important;
    max-width: 100% !important;
  }
  
  .ant-timeline {
    overflow: visible !important;
    max-width: 100% !important;
  }
  
  .ant-timeline-item {
    overflow: visible !important;
    max-width: 100% !important;
  }
  
  .ant-space {
    overflow: visible !important;
    max-width: 100% !important;
  }
  
  .ant-empty {
    overflow: visible !important;
    max-width: 100% !important;
  }
  
  // prevent text and URL from causing horizontal scrolling
  .ant-typography {
    word-break: break-all !important;
    white-space: normal !important;
    max-width: 100% !important;
  }
  
  // ensure input and button do not exceed container
  .ant-input {
    max-width: 100% !important;
  }
  
  .ant-btn {
    max-width: 100% !important;
    word-break: break-all;
  }
  
  // special styles optimization for RecordTimeline
  .record-timeline {
    overflow: visible !important;
    max-width: 100% !important;
    
    * {
      overflow: visible !important;
      box-sizing: border-box;
      max-width: 100% !important;
    }
    
    // if content is long, ensure it can be displayed completely
    .ant-timeline-item-content {
      overflow: visible !important;
      word-break: break-word;
      width: 100% !important;
      max-width: 100% !important;
    }
    
    // ensure timeline items fully utilize width
    .ant-timeline-item {
      width: 100% !important;
      max-width: 100% !important;
    }
    
    // card style optimization
    .ant-card {
      margin-bottom: 8px;
      width: 100% !important;
      max-width: 100% !important;
      
      .ant-card-body {
        padding: 12px 16px;
        word-wrap: break-word;
        overflow-wrap: break-word;
      }
    }
    
    // special handling of long text and URL
    .ant-space-item {
      word-break: break-all;
      white-space: normal;
      max-width: 100%;
    }
    
    // optimize Space component inside Timeline component
    .ant-space {
      width: 100% !important;
      max-width: 100% !important;
      
      .ant-space-item {
        max-width: 100% !important;
        word-break: break-all !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
      }
    }
    
    // handle Typography component inside RecordTimeline
    .ant-typography {
      word-break: break-all !important;
      white-space: normal !important;
      max-width: 100% !important;
      overflow-wrap: break-word !important;
    }
    
    // special handling of long URL display
    .ant-typography[type="secondary"] {
      word-break: break-all !important;
      white-space: normal !important;
      max-width: 100% !important;
      overflow-wrap: anywhere !important;
    }
    
    // handle Tag component
    .ant-tag {
      max-width: 100% !important;
      word-break: break-all !important;
      white-space: normal !important;
    }
    
    // handle Button component
    .ant-btn {
      max-width: 100% !important;
      word-break: break-all !important;
    }
    
    // handle Code text
    code {
      word-break: break-all !important;
      white-space: normal !important;
      max-width: 100% !important;
      overflow-wrap: break-word !important;
    }
    
    // handle fixed-width elements
    img {
      max-width: 100% !important;
      height: auto !important;
    }
    
    // ensure all text content can wrap correctly
    * {
      word-wrap: break-word !important;
      overflow-wrap: break-word !important;
    }
  }
} 
.ant-btn-variant-outlined:disabled{
  background: none !important;
}